package tp1;

import java.io.File;
import java.util.Comparator;

public class FileComparator implements Comparator<File> {

	@Override
	 public int compare(File o1, File o2) {
        if (o1.isDirectory())
            return o2.isDirectory() ? o1.compareTo(o2) : -1;
        else if (o2.isDirectory())
            return 1;

        return o1.compareTo(o2);
    }


}
